<?php
namespace App\Modules\Admin\Providers;

use App\Modules\Admin\Providers\RouteServiceProvider;
use Illuminate\Support\ServiceProvider;

class AdminServiceProvider extends ServiceProvider
{
    /**
     * @var string $moduleName
     */
    protected $moduleName = 'Admin';

    /**
     * @var string $moduleNameLower
     */
    protected $moduleNameLower = 'admin';

    public function boot()
    {
        //加载数据库Migrate
        $this->loadMigrationsFrom(module_path($this->moduleName, 'Database/Migrations'));

    }

    public function register()
    {
        $this->app->register(RouteServiceProvider::class); //模块路由服务
        $this->app->register(RepositoryServiceProvider::class); //仓库绑定服务
    }
}
